﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ProductTypeManagement.aspx.cs" Inherits="WebApp.ProductTypeManagement" %>
<%@ import namespace="Domain.Models" %>

<asp:Content ID="Content1" ContentPlaceHolderID="scriptCssContent" runat="server">
    <link href="css/tables.css" type="text/css" rel="Stylesheet" />
    <script language="javascript" type="text/javascript" src="js/common.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            alert("abcd");
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="titlePlaceHolder" runat="server">
    <asp:literal id="pageTitle" runat="server"></asp:literal>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="menuPlaceHolder" runat="server">
    <one:TabStrip runat="server">
        <one:Tab Name="vnexpress" NavigateUrl="www.vnexpress.net" Text="VnExpress"></one:Tab>
    </one:TabStrip>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="contentPlaceHolder" runat="server">
    <asp:label id="messageLabel" runat="server" cssclass="ErrorMessage"></asp:label><%= messageLabel.Visible == true ? "<br /><br />" : "" %>
    <one:repeater id="repeaterTypes" runat="server">
        <headertemplate>
            <table class="Grid">
                <thead>
                    <tr>
                        <th class="Check"><input type="checkbox" id="checkAll" onclick="choiceBehavior.doCheckAll(this.checked)" /></th>
                        <th><a href="<%= GetOrderByLink(ProductTypeOrderBy.ID.ToString()) %>"><%= Resources.Strings.ID %></a><%= GetOrderDirectionIndicator(ProductTypeOrderBy.ID.ToString())%></th>
                        <th><a href="<%= GetOrderByLink(ProductTypeOrderBy.ProductTypeName.ToString()) %>"><%= Resources.Strings.ProductTypeName %></a><%= GetOrderDirectionIndicator(ProductTypeOrderBy.ProductTypeName.ToString())%></th>
                        <th><a href="<%= GetOrderByLink(ProductTypeOrderBy.DisplayColor.ToString()) %>"><%= Resources.Strings.Color %></a><%= GetOrderDirectionIndicator(ProductTypeOrderBy.DisplayColor.ToString())%></th>
                        <th>&nbsp;</th>
                    </tr>
                </thead>
                <tbody>
        </headertemplate>
        <itemtemplate>
                    <tr>
                        <td class="Check"><input type="checkbox" id="selectedCheckBox<%# Container.ItemIndex %>" name="selectedItems" value="<%# Eval(ProductTypeOrderBy.ID.ToString()) %>" onclick="choiceBehavior.checkChanged(this.checked)"/></td>
                        <td class="Number"><%# One.Web.HttpUtility.HtmlEncode(Eval(ProductTypeOrderBy.ID.ToString()))%></td>
                        <td><%# One.Web.HttpUtility.HtmlEncode(Eval(ProductTypeOrderBy.ProductTypeName.ToString()))%></td>
                        <td><%# One.Web.HttpUtility.HtmlEncode(Eval(ProductTypeOrderBy.DisplayColor.ToString()))%></td>
						<td>
						    <a href="ProductTypeEdit.aspx?Id=<%# Eval(ProductTypeOrderBy.ID.ToString()) %>"><%= Resources.Strings.Edit %></a>
						</td>
                    </tr>
        </itemtemplate>
        <nonetemplate>
                    <tr>
                        <td colspan="7"><%= Resources.Strings.NoTicketItem %></td>
                    </tr>
        </nonetemplate>
        <footertemplate>
                </tbody>
            </table>
        </footertemplate>
    </one:repeater>
    <div class="Pagination">
        <one:pager runat="server" id="pager" parameter="page"></one:pager>
    </div>
    <div class="ActionRow">     
        <input type="button" value="<%= Resources.Strings.Detail %>" onclick="window.location = 'TicketDetail.aspx';" />
    </div>
    <script language="javascript" type="text/javascript">
        choiceBehavior.totalItems = <%= listProductType == null ? 0 : listProductType.Tables[0].Rows.Count %>;
        choiceBehavior.btnActions = new Array();
        choiceBehavior.checkAll = getControl('checkAll');
        choiceBehavior.init();
    </script>    
</asp:Content>
